package com.leyou.gateway.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("auth-service")
public interface AuthClient {

    /**
     * 微服务之间的授权
     * @param id        微服务的id
     * @param secret    微服务的密码
     * @return          返回授权后的JWT
     */
    @GetMapping("/authorization ")
    public String authorization(@RequestParam("id") Long id, @RequestParam("secret") String secret);
}
